<template>
  <div class="app-container">
    <div class="item2">
      <div class="header">
        <div class="title1">
          <i class="el-icon-data-analysis"></i><span>复核台任务查询</span>
        </div>
        <div class="backB">
          <img src="@/assets/images/back.png" alt="" @click="goBack" />
        </div>
      </div>
      <div class="formCenter">
        <el-form
          :model="queryParams"
          size="large"
          :inline="true"
          ref="queryForm"
          label-width="90px"
        >
          <el-form-item label="复核台号:" prop="areaNo">
            <el-input
              v-model="queryParams.areaNo"
              placeholder="请输入复核台号"
              clearable
            />
          </el-form-item>
          <el-form-item>
            <el-button
              type="primary"
              icon="el-icon-search"
              size="medium"
              @click="handleQuery"
              >搜索</el-button
            >
            <el-button
              type="primary"
              icon="el-icon-search"
              size="medium"
              @click="resetQuery"
              >重置</el-button
            >
          </el-form-item>
        </el-form>
      </div>
      <el-table
        :data="tableData"
        border
        height="680"
        v-loading="loading"
        element-loading-text="拼命加载中"
        element-loading-spinner="el-icon-loading"
        :header-cell-style="{ background: '#1890ff', color: '#ffffff' }"
      >
        <el-table-column align="center" prop="areaNo" label="复核台号">
        </el-table-column>
        <el-table-column align="center" prop="taskId" label="任务ID">
        </el-table-column>
        <el-table-column align="center" prop="containerNo" label="周转箱号">
        </el-table-column>
        <el-table-column align="center" prop="updateTime" label="更新时间">
        </el-table-column>
        <!-- <el-table-column
          label="操作"
          align="center"
          class-name="small-padding fixed-width"
        >
          <template slot-scope="scope">
            <el-button
              size="mini"
              type="text"
              icon="el-icon-edit"
              @click="handleRelease(scope.row)"
              >修改锁定状态</el-button
            >
          </template>
        </el-table-column> -->
      </el-table>
      <div>
        <pagination
          v-show="total > 0"
          :total="total"
          :page.sync="queryParams.pageNum"
          :limit.sync="queryParams.pageSize"
          @pagination="handleQuery"
        />
      </div>
    </div>
  </div>
</template>

<script>
import { reviewlist } from "@/api/subSystem/continer";
export default {
  dicts: ["agv_tasktype"],
  data() {
    return {
      // 总条数
      total: 0,
      queryParams: {
        pageNum: 1,
        pageSize: 20,
        areaNo: null,
      },
      tableData: [],
      loading: false,
    };
  },
  mounted() {
    this.handleQuery();
  },
  methods: {
    goBack() {
      this.$router.push("/subSystem1");
    },
    // 重置
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    handleQuery() {
      this.loading = true;
      reviewlist(this.queryParams).then((res) => {
        this.tableData = res.rows;
        this.total = res.total;
        this.loading = false;
      });
    },
  },
};
</script>
<style lang="scss" scoped>
.app-container {
  .el-icon-data-analysis::before {
    color: #00d9ff;
    margin-right: 8px;
  }
  .title1 {
    font-size: 16px;
    // margin-bottom: 15px;
    color: #808080;
    width: 170px;
    padding: 5px;
    border-bottom: 1px dotted #8ddfff;
  }
  .header {
    margin-top: -10px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;

    .el-date-editor.el-input,
    .el-date-editor.el-input__inner {
      width: 220px;
      margin-right: 20px;
    }

    .backB {
      cursor: pointer;

      img {
        width: 20%;
      }
    }
  }
  .formCenter {
    height: 62px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
  }
  .footer {
    margin-top: 20px;
    width: 100%;
    min-height: 200px;
  }
}
</style>